package com.hzhjhh.view.manageView.menus.purchase.enums;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 菜单栏初始化-采购-付款单弹出框-展示字段映射enum
 * 
 * @author 12083
 *
 */
@Getter
@AllArgsConstructor
public enum PaymentShowEnum {

	ORDER_ID("orderId", "进货单号"),
	SUPPLIER("supplier", "供货商"),
	CURRENCY("currency", "货币"),
	PAY_TYPE("payType", "付款方式"),
	PAY_AMT("payAmt", "付款金额"),
	BILL_NUM("billNum", "支票号"),
	DATE("date", "日期"),
	HANDLER("handler", "经手人"),
	CREATOR("creator", "制单人"),
	;
	
	/**
	 * 列对应的code
	 */
	private final String columnCode;
	/**
	 * 列展示时候的名称
	 */
	private final String columnName;
	
	public static Map<String, String> descMap() {
		return Arrays.asList(PaymentShowEnum.values())
				.stream()
				.collect(Collectors.toMap(PaymentShowEnum::getColumnName, PaymentShowEnum::getColumnCode, (v1, v2) -> v1));
	}
}
